package com.ddstation.common.property;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class AliCloudOssProperties {
	
	private static String fileName = "/ali_cloud_service.properties";
	
	public static void initialize(String rootpath) throws IOException {
		Properties prop =  new  Properties();
		InputStream in = new FileInputStream(rootpath + fileName);
		prop.load(in);
		accessKeyId = prop.getProperty("accessKeyId").trim();
		accessKeySecret = prop.getProperty("accessKeySecret").trim();
		urlvaildtime = Integer.parseInt(prop.getProperty("urlvaildtime").trim());
		bucketName = prop.getProperty("bucketName").trim();
		ossendpoint = prop.getProperty("ossendpoint").trim();
		callbackOssendpoint = prop.getProperty("callback_ossendpoint").trim();
	}
	
    public static String accessKeyId = null;
    public static String accessKeySecret = null;
    public static Integer urlvaildtime = null;
    public static String bucketName = null;
    public static String ossendpoint = null;
    public static String callbackOssendpoint = null;
}
